<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../../_template.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="centro">
        <h:form>

            <p:outputLabel value="Atividade Principal - Incluir" style="font-size: x-large" styleClass="labelInserir" />

            <p:fieldset styleClass="fieldsetInsert">
                <p:messages />
                <h:panelGrid columns="1">
                    <p:outputLabel style="margin-right: 5px; text-align: left;" value="Descrição" for="desc" /> 

                    <p:inputText id="desc" value="#{atividadePrincipalBean.atividadePrincipal.descricao}" style="width: 500px;" required="true"  
                                 label="Descrição"  requiredMessage="O campo 'Descrição' deve ser preenchido!" >
                        <f:validateLength minimum="3" maximum="50" />
                    </p:inputText>
                </h:panelGrid>
                <br/>
                <br/>
                <p:commandButton value="Gravar" action="#{atividadePrincipalBean.gravar}" style="margin-right: 10px;" 
                                                                                            icon="ui-icon-check" ajax="false" />
                <p:commandButton value="Voltar" action="#{atividadePrincipalBean.voltar}" immediate="true" ajax="false" />
            </p:fieldset>
        </h:form>
    </ui:define>
</ui:composition>
